package pixivPc;

import java.awt.Container;
import java.awt.FlowLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Arrays;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

import pixivPc.RequestUtil.SendType;
import pixivPc.task.IndexTask;
import pixivPc.ui.MainFrame;

public class Main {

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		// String url = "http://www.pixiv.net";
		// String para = "parameters={\"cond_equal\":{\"client_key\":3}}";
		// String sr = RequestUtil.send(url, SendType.POST, "").toFile();
		// System.out.println(sr);
		// System.out.println("-----------------------------------------");
		// String sr = HttpRequestUtil.sendGet(url, "");
		// System.out.println(sr);
		// Files.write(Paths.get("result.txt"), Arrays.asList(sr),
		// StandardCharsets.UTF_8);
		
		MainFrame main = new MainFrame();

		new IndexTask().run(main.getPanel("user"));

		System.out.println("---------------");
	}

}
